package com.example.demo.controller;

import com.example.demo.entity.ComboMeal;
import com.example.demo.service.ComboMealService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@CrossOrigin(origins = "http://localhost:8080")
@RequestMapping("/comboMeal")
public class ComboMealController {

    @Autowired
    private ComboMealService comboMealService;

    @GetMapping("/list")
    public List<ComboMeal> getComboMealList() {
        return comboMealService.getComboMealList();
    }
}
